<include  file='Public:header'/>
    <div class="local">
        当前位置: 系统 > 后台菜单设置 > 菜单列表
    </div>
    <div class="action">
        <em>注意：</em> 这里主要管理后台的菜单，通常后台的基本权限是和这类菜单关联的！
    </div>
    <div class="listBox clfx">
        <div class="cl"></div>
        <div class="memberAdd">
            <span class="s2">
                {:BA('menu/add', '', '添加菜单', 'load', '', '50%', '50%')}
            </span>
        </div>
        <div class="cl"></div>
        <form action="{:U('menu/update')}" target="simpleO2O_frm" method="post">
            <table cellpadding="0"  cellspacing="0" width="100%" class="rembertable">
            <tr>
                <th style="text-align: left; padding-left: 10px;">菜单名称</th>
                <th>排序</th>
                <th style="text-align: left;">操作</th>
            </tr>
            <foreach name="datas" item="var">
                <if condition="($var.parent_id eq 0)">  
                    <tr>
                        <td style="text-align: left;padding-left: 10px;"><b>{$var.menu_name}</b></td>        
                        <td>
                            <input name="orderby[{$var.menu_id}]" value="{$var.orderby}" type="text" class="remberinput w80" />
                        </td>
                        <td style="text-align: left;">
                            {:BA('menu/add', array("parent_id" => $var['menu_id']), '添加', 'load', 'remberBtn')}
                            {:BA('menu/edit', array("id" => $var['menu_id']), '编辑', 'load', 'remberBtn')}
                            {:BA('menu/delete', array("id" => $var['menu_id']), '删除', 'act', 'remberBtn')}
                        </td>
                    </tr> 
                    <foreach name="datas" item="var2">
                        <eq name="var2.parent_id" value="$var.menu_id">
                            <tr>
                                <td style="text-align: left;padding-left: 10px;">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|----{$var2.menu_name}
                                </td>
                                <td>
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input name="orderby[{$var2.menu_id}]" value="{$var2.orderby}" type="text" class="remberinput w80" />
                                </td>
                                <td style="text-align: left;">
                                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                    {:BA('menu/action', array("parent_id" => $var2['menu_id']), '添加', 'load', 'remberBtn')}
                                    {:BA('menu/edit', array("id" => $var2['menu_id']), '编辑', 'load', 'remberBtn')}
                                    {:BA('menu/delete', array("id" => $var2['menu_id']), '删除', 'act', 'remberBtn')}
                                </td>
                            </tr>
                        </eq>
                    </foreach>
                </if>
            </foreach>
            <tr>
                <td colspan="20" align="left">
                    <div class="lt">
                        <input type="submit"  class="remberSubmit" value="更新"  />
                    </div>
                </td>
            </tr>
        </table>
        </form> 
    </div>
<include  file='Public:footer'/>       